package com.example.sqldemo.SpringContext;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {
    public static void main(String[] args) {
        // 1. 获取spring上下文-方式1
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("你的配置bean的xml文件");
        // 2. 通过配置类获取
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    }
}
